import {Component, OnInit,EventEmitter,Output} from '@angular/core';

@Component({
  selector: 'app-search-bar',
  imports: [],
  templateUrl: './search-bar.html',
  styleUrl: './search-bar.css'
})
export class SearchBar implements OnInit{
  @Output() submitted = new EventEmitter<string>();

  term='';

  constructor() {
  }

  ngOnInit() {
  }

  onFormSubmit(event:any){
    event.preventDefault();
    this.submitted.emit(this.term);
  }

}
